home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / X11 / dps.z / dps
Text File  |  1998-10-30  |  22KB  |  529 lines

  1.  
  2.  
  3.  
  4.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           dps - Display PostScript imaging for the X Window System
  10.  
  11.  
  12.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  13.           This manual page provides information about the Display
  14.           PostScript system, implemented as an extension to the X
  15.           Window System.
  16.  
  17.             The INTRODUCTION section contains a brief, nontechnical
  18.             description of the Display PostScript system.
  19.  
  20.             The remaining sections provide the application developer
  21.             with more detailed technical information about the
  22.             architecture.
  23.  
  24.             The REFERENCES section describes additional documentation
  25.             and tells you how to use Adobe's public access file
  26.             server.
  27.  
  28.  
  29.         IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
  30.           The PostScript language is a simple interpretive programming
  31.           language with powerful graphics capabilities. Its primary
  32.           purpose is to describe the appearance of text, graphical
  33.           shapes, and images on printed or displayed pages.  If an
  34.           application, such as a word processing system or graphics
  35.           package, produces a page description using the PostScript
  36.           language, you can print the pages on a wide variety of
  37.           PostScript printers and view them on monitors where the
  38.           Display PostScript system is available.
  39.  
  40.           The Display PostScript system is a high-performance
  41.           implementation of the PostScript language for interactive
  42.           computer displays. The use of the Display PostScript system
  43.           ensures true WYSIWYG (What You See Is What You Get) between
  44.           the display and any PostScript printer.
  45.  
  46.  
  47.         DDDDIIIISSSSPPPPLLLLAAAAYYYY PPPPOOOOSSSSTTTTSSSSCCCCRRRRIIIIPPPPTTTT SSSSYYYYSSSSTTTTEEEEMMMM AAAARRRRCCCCHHHHIIIITTTTEEEECCCCTTTTUUUURRRREEEE
  48.           The Display PostScript system is part of the X Window System
  49.           and is implemented as an X extension. Display PostScript
  50.           applications use window system features for window placement
  51.           and sizing, menu creation, and event handling, while using
  52.           Display PostScript features to take care of imaging inside
  53.           the window.
  54.  
  55.           Display PostScript system components include:
  56.  
  57.             The PostScript interpreter.
  58.  
  59.             The Client Library - a C language interface to the basic
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  71.  
  72.  
  73.  
  74.             facilities of the Display PostScript system.
  75.  
  76.             _p_s_w_r_a_p - a preprocessor that prepares PostScript language
  77.             programs for invocation from a C program.
  78.  
  79.           These components are discussed below.
  80.  
  81.  
  82.         AAAAPPPPPPPPLLLLIIIICCCCAAAATTTTIIIIOOOONNNN BBBBUUUUIIIILLLLDDDDIIIINNNNGGGG BBBBLLLLOOOOCCCCKKKKSSSS
  83.           Most of a Display PostScript application is written in C or
  84.           another high-level language.  It calls Client Library
  85.           procedures to start a PostScript execution context, send
  86.           programs and data to the PostScript interpreter, and get
  87.           results from the interpreter.  The Client Library is the
  88.           application's primary interface to the Display PostScript
  89.           system.
  90.  
  91.           In addition, it calls _w_r_a_p_s - custom PostScript language
  92.           procedures developed specifically for the application. Wraps
  93.           are generated by the _p_s_w_r_a_p translator from application-
  94.           specific PostScript language code.
  95.  
  96.  
  97.         UUUUSSSSIIIINNNNGGGG PPPPSSSSWWWWRRRRAAAAPPPP
  98.           _p_s_w_r_a_p is a preprocessor that takes PostScript language code
  99.           as input and embeds it in C-callable procedures, or wraps.
  100.           The output of _p_s_w_r_a_p is compiled and linked with the rest of
  101.           your application, which can then call the wraps to transmit
  102.           PostScript language code to the PostScript interpreter.
  103.  
  104.           A Display PostScript application uses C or another high-
  105.           level language to perform calculations, communicate with the
  106.           window system, read and write files, and do other
  107.           application processing.  It uses wraps primarily for imaging
  108.           tasks.
  109.  
  110.           Consider a procedure, PPPPSSSSWWWWDDDDiiiissssppppllllaaaayyyyTTTTeeeexxxxtttt, that places text on
  111.           the screen at a particular _x,_y coordinate.  A call to this
  112.           wrap from the application program might look something like
  113.           this:
  114.  
  115.                 PSWDisplayText(72.0, 100.0, "Hello World");
  116.  
  117.           The body of the PPPPSSSSWWWWDDDDiiiissssppppllllaaaayyyyTTTTeeeexxxxtttt procedure is actually written
  118.           in the PostScript language.  It was defined to _p_s_w_r_a_p as
  119.           follows:
  120.  
  121.                defineps PSWDisplayText(float X,Y; char *text)
  122.                     X Y moveto
  123.                     (text) show
  124.                endps
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  137.  
  138.  
  139.  
  140.           In the wrap definition, the ddddeeeeffffiiiinnnneeeeppppssss and eeeennnnddddppppssss keywords tell
  141.           _p_s_w_r_a_p where a given PostScript language program begins and
  142.           ends.  The ddddeeeeffffiiiinnnneeeeppppssss statement defines the resulting
  143.           procedure call.  The _p_s_w_r_a_p translator processes this input
  144.           and produces a C language source-code file.  When compiled
  145.           and linked with the application, the PPPPSSSSWWWWDDDDiiiissssppppllllaaaayyyyTTTTeeeexxxxtttt
  146.           procedure sends a PostScript language program to the
  147.           interpreter (binary-encoded for more efficient processing),
  148.           causing "Hello World" to be displayed on the screen.
  149.  
  150.           See the _P_r_o_g_r_a_m_m_i_n_g _t_h_e _D_i_s_p_l_a_y _P_o_s_t_S_c_r_i_p_t _S_y_s_t_e_m _w_i_t_h for
  151.           further information.
  152.  
  153.  
  154.  
  155.         TTTTHHHHEEEE CCCCLLLLIIIIEEEENNNNTTTT LLLLIIIIBBBBRRRRAAAARRRRYYYY
  156.           The Display PostScript Client Library is a linkable library
  157.           of compiled C procedures that provides an interface between
  158.           the application and the Display PostScript system.  It
  159.           creates an environment for handling imaging calls to
  160.           specific Client Library procedures like DDDDPPPPSSSSmmmmoooovvvveeeettttoooo and to
  161.           custom wraps written for the application.
  162.  
  163.           To the application programmer, it appears that Client
  164.           Library procedures directly produce graphical output on the
  165.           display. In fact, these procedures generate PostScript
  166.           language statements and transmit them to the PostScript
  167.           interpreter for execution; the PostScript interpreter then
  168.           produces graphical output that is displayed by device-
  169.           specific procedures in the Display PostScript system. In
  170.           this way, the Client Library makes the full power of the
  171.           PostScript interpreter and imaging model available to a C
  172.           language program.
  173.  
  174.           The Client Library includes procedures for creating,
  175.           communicating with, and destroying PostScript execution
  176.           contexts. A context consists of all the information (or
  177.           "state") needed by the PostScript interpreter to execute a
  178.           PostScript language program. In the Client Library
  179.           interface, each context is represented by a DDDDPPPPSSSSCCCCoooonnnntttteeeexxxxttttRRRReeeecccc
  180.           data structure. PostScript execution contexts are described
  181.           in the _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _S_e_c_o_n_d _E_d_i_t_i_o_n.
  182.  
  183.  
  184.      RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  185.           Information about the PostScript Language and the Display
  186.           PostScript system is available in a number of manuals and
  187.           via the public access file server described below.
  188.  
  189.  
  190.         PPPPOOOOSSSSTTTTSSSSCCCCRRRRIIIIPPPPTTTT LLLLAAAANNNNGGGGUUUUAAAAGGGGEEEE MMMMAAAANNNNUUUUAAAALLLLSSSS
  191.           If you're new to the PostScript language, you should first
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  203.  
  204.  
  205.  
  206.           read the following manuals (published by Addison-Wesley and
  207.           available from Adobe Systems Incorporated or through your
  208.           technical bookstore):
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/30/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  269.  
  270.  
  271.  
  272.           _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _S_e_c_o_n_d _E_d_i_t_i_o_n
  273.  
  274.             The standard reference for the PostScript language.
  275.             Describes the PostScript imaging model and the concepts
  276.             and facilities of the PostScript interpreter. Documents
  277.             the PostScript language.  Required reading.
  278.  
  279.           _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _T_u_t_o_r_i_a_l _a_n_d _C_o_o_k_b_o_o_k
  280.  
  281.             Introduction to the PostScript language in an informal,
  282.             interactive style.  Contains a collection of example
  283.             programs that illustrate the PostScript imaging model.
  284.  
  285.           _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _P_r_o_g_r_a_m _D_e_s_i_g_n
  286.  
  287.             Guidelines for the advanced developer to use in designing
  288.             and debugging PostScript language programs.  Printer-
  289.             oriented, but most of the information is relevant to
  290.             writing a Display PostScript application.
  291.  
  292.         DDDDIIIISSSSPPPPLLLLAAAAYYYY PPPPOOOOSSSSTTTTSSSSCCCCRRRRIIIIPPPPTTTT MMMMAAAANNNNUUUUAAAALLLLSSSS
  293.           Once you're up to speed in the PostScript language, read
  294.           _P_r_o_g_r_a_m_m_i_n_g _t_h_e _D_i_s_p_l_a_y _P_o_s_t_S_c_r_i_p_t _S_y_s_t_e_m _w_i_t_h _X, available
  295.           from Addison-Wesley. This book is collection of manuals that
  296.           explain how to render text and graphics with the Display
  297.           PostScript extension to X. It contains the following
  298.           manuals:
  299.  
  300.           _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e
  301.  
  302.             Explains how to render text and graphics with the Display
  303.             PostScript extension to X.
  304.  
  305.           _C_l_i_e_n_t _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l
  306.  
  307.             Describes the procedural interface to the Display
  308.             PostScript system.  Tells how to send programs and data to
  309.             a PostScript execution context, how to handle context
  310.             output, how to create and terminate a context.  Contains
  311.             procedure definitions, programming tips, and a sample
  312.             application program.
  313.  
  314.           _C_l_i_e_n_t _L_i_b_r_a_r_y _S_u_p_p_l_e_m_e_n_t _f_o_r _X
  315.  
  316.             Describes Display PostScript features that are specific to
  317.             the X Window System, such as context creation and
  318.             additional error codes.
  319.  
  320.           _p_s_w_r_a_p _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l
  321.  
  322.             Describes how to define C-callable procedures that contain
  323.             PostScript language programs.  Tells how to declare input
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 4/30/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  335.  
  336.  
  337.  
  338.             arguments and output to be received from the interpreter.
  339.             Documents the _p_s_w_r_a_p command line options.
  340.  
  341.           _D_i_s_p_l_a_y _P_o_s_t_S_c_r_i_p_t _T_o_o_l_k_i_t _f_o_r _X
  342.  
  343.             Describes the Display PostScript Toolkit for the X Window
  344.             System.  It also contains information about locating
  345.             PostScript language resources and about the _m_a_k_e_p_s_r_e_s
  346.             utility.
  347.  
  348.           Much of the same information can also by found in
  349.           _P_r_o_g_r_a_m_m_i_n_g _t_h_e _D_i_s_p_l_a_y _P_o_s_t_S_c_r_i_p_t _S_y_s_t_e_m _w_i_t_h _N_e_X_T_s_t_e_p,
  350.           also available from Addison-Wesley.
  351.  
  352.         TTTTHHHHEEEE PPPPUUUUBBBBLLLLIIIICCCC AAAACCCCCCCCEEEESSSSSSSS FFFFIIIILLLLEEEE SSSSEEEERRRRVVVVEEEERRRR
  353.           Adobe Systems Incorporated provides a public access file
  354.           server. If you have access to Internet or UUCP electronic
  355.           mail, you can use the public access file server to obtain
  356.           the following information:
  357.  
  358.                  Display PostScript system manuals
  359.  
  360.                  Code examples
  361.  
  362.                  AFM files
  363.  
  364.                  Documentation updates
  365.  
  366.           The public access file server is a mail-response program.
  367.           That is, you send it a request by electronic mail and it
  368.           mails back a response.  (The ``Subject:'' line is treated as
  369.           part of the message by the file server.)
  370.  
  371.           To send mail to the file server, use one of the following
  372.           addresses:
  373.  
  374.             _I_n_t_e_r_n_e_t  ppppssss----ffffiiiilllleeee----sssseeeerrrrvvvveeeerrrr@@@@aaaaddddoooobbbbeeee....ccccoooommmm
  375.  
  376.             _U_U_C_P ............!!!!ddddeeeeccccwwwwrrrrllll!!!!aaaaddddoooobbbbeeee!!!!ppppssss----ffffiiiilllleeee----sssseeeerrrrvvvveeeerrrr
  377.  
  378.           To receive a quick summary of file server commands, send the
  379.           following message:
  380.  
  381.             hhhheeeellllpppp
  382.  
  383.           To receive detailed information on how to use the file
  384.           server, send the following message:
  385.  
  386.             sssseeeennnndddd DDDDooooccccuuuummmmeeeennnnttttssss lllloooonnnngggg....hhhheeeellllpppp
  387.  
  388.         CCCCOOOOLLLLOOOORRRRMMMMAAAAPPPP UUUUSSSSAAAAGGGGEEEE
  389.           The Display PostScript system uses entries from the default
  390.  
  391.  
  392.  
  393.      Page 6                                          (printed 4/30/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  401.  
  402.  
  403.  
  404.           X colormap to display colors and grey values.  You can
  405.           configure this usage.  Giving the Display PostScript system
  406.           more colormap entries improves the quality of its rendering,
  407.           but leaves fewer entries available to other applications
  408.           since the default colormap is shared.
  409.  
  410.           Resources in your .Xdefaults file control the colormap
  411.           usage.  Each resource entry should be of the form
  412.  
  413.             DPSColorCube.visualType.depth.color: size
  414.  
  415.           where
  416.  
  417.             visualType is one of GrayScale, PseudoColor, or
  418.             DirectColor.
  419.  
  420.             depth is 1, 2, 4, 8, 12, or 24 and should be the largest
  421.             depth equal to or less than the default depth.
  422.  
  423.             color is one of the strings "reds", "greens", "blues", or
  424.             "grays".
  425.  
  426.             size is the number of values to allocate of that color.
  427.  
  428.           These resources are not used for the static visual types
  429.           StaticGray, StaticColor, or TrueColor.  Specifying 0 for
  430.           reds directs the Client Library to use only a gray ramp.
  431.           This specification is particularly useful for gray-scale
  432.           systems that incorrectly have PseudoColor as the default
  433.           visual.
  434.  
  435.           For example, to configure a 5x5x4 color cube and a 17-
  436.           element gray ramp for an 8-bit PseudoColor screen, specify
  437.           these resources:
  438.  
  439.             DPSColorCube.PseudoColor.8.reds: 5
  440.             DPSColorCube.PseudoColor.8.greens: 5
  441.             DPSColorCube.PseudoColor.8.blues: 4
  442.             DPSColorCube.PseudoColor.8.grays: 17
  443.  
  444.           These resources use 117 colormap entries, 100 for the color
  445.           cube and 17 for the gray ramp.  For the best rendering
  446.           results, specify an odd number for the gray ramp.
  447.  
  448.           Resources that are not specified take these default values:
  449.  
  450.             DPSColorCube.GrayScale.4.grays: 9
  451.             DPSColorCube.GrayScale.8.grays: 17
  452.  
  453.             DPSColorCube.PseudoColor.4.reds: 2
  454.             DPSColorCube.PseudoColor.4.greens: 2
  455.             DPSColorCube.PseudoColor.4.blues: 2
  456.  
  457.  
  458.  
  459.      Page 7                                          (printed 4/30/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))AAAAddddoooobbbbeeee SSSSyyyysssstttteeeemmmmssss ((((11113333 MMMMaaaayyyy 1111999999993333))))DDDDiiiissssppppllllaaaayyyy PPPPoooossssttttSSSSccccrrrriiiipppptttt((((1111))))
  467.  
  468.  
  469.  
  470.             DPSColorCube.PseudoColor.4.grays: 2
  471.             DPSColorCube.PseudoColor.8.reds: 4
  472.             DPSColorCube.PseudoColor.8.greens: 4
  473.             DPSColorCube.PseudoColor.8.blues: 4
  474.             DPSColorCube.PseudoColor.8.grays: 9
  475.             DPSColorCube.PseudoColor.12.reds: 6
  476.             DPSColorCube.PseudoColor.12.greens: 6
  477.             DPSColorCube.PseudoColor.12.blues: 5
  478.             DPSColorCube.PseudoColor.12.grays: 17
  479.  
  480.             DPSColorCube.DirectColor.12.reds: 6
  481.             DPSColorCube.DirectColor.12.greens: 6
  482.             DPSColorCube.DirectColor.12.blues: 6
  483.             DPSColorCube.DirectColor.12.grays: 6
  484.             DPSColorCube.DirectColor.24.reds: 7
  485.             DPSColorCube.DirectColor.24.greens: 7
  486.             DPSColorCube.DirectColor.24.blues: 7
  487.             DPSColorCube.DirectColor.24.grays: 7
  488.  
  489.           If none of the above defaults apply to the display, the
  490.           Client Library uses no color cube and a 2-element gray ramp;
  491.           that is, black and white.
  492.  
  493.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  494.           pswrap(1), dpsexec(1).
  495.  
  496.      NNNNOOOOTTTTEEEESSSS
  497.           Copyright 1988-1992 Adobe Systems Incorporated.
  498.  
  499.           PostScript and Display PostScript are trademarks of Adobe
  500.           Systems Incorporated which may be registered in certain
  501.           jurisdictions.
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                                          (printed 4/30/98)
  526.  
  527.  
  528.  
  529.